<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/common/taglibs.jsp"%>
<%@ page import="org.springside.core.Constants,cn.firstsoft.firstframe.util.ContextUtils,
				 cn.firstsoft.firstframe.web.FirstFrameBeanFactory,
				 org.springside.modules.security.service.logic.SystemLoginThemeManager,
				 org.springside.modules.security.domain.SystemLoginTheme"%>
<%
SystemLoginThemeManager systemLoginThemeManager = (SystemLoginThemeManager) FirstFrameBeanFactory.getBean("systemLoginThemeManager");
SystemLoginTheme systemLoginTheme = systemLoginThemeManager.getSystemLoginTheme();
request.setAttribute("loginImageContextPath",request.getContextPath().concat("/themes/mskin/login/new/images/"));
request.setAttribute("loginTheme",systemLoginTheme.getLoginTheme());
request.setAttribute("loginImageName",systemLoginTheme.getLoginImageName());
request.setAttribute("loginImageType",systemLoginTheme.getLoginImageType());
String loginBackGroundColor = "";
if(systemLoginTheme.getLoginTheme() == 1 || systemLoginTheme.getLoginTheme() == 4){
	loginBackGroundColor = "#0570B7";
}else if(systemLoginTheme.getLoginTheme() == 2){
	loginBackGroundColor = "#DF9A4D";
}else if(systemLoginTheme.getLoginTheme() == 3){
	loginBackGroundColor = "#418D23";
}
%>
<fmt:message key="login_error_code_error" var="login_error_code_error"/>
<fmt:message key="login_error_1" var="login_error_1"/>
<fmt:message key="login_error_2" var="login_error_2"/>
<fmt:message key="login_error_3" var="login_error_3"/>
<fmt:message key="login_error_4" var="login_error_4"/>
<fmt:message key="login_error_5" var="login_error_5"/>
<fmt:message key="login_error_7" var="login_error_7"/>
<fmt:message key="login_error_8" var="login_error_8"/>
<fmt:message key="login_error_9" var="login_error_9"/>

<fmt:message key="login_username" var="login_username"/>
<fmt:message key="login_password" var="login_password"/>
<fmt:message key="login_j_captcha_response" var="login_j_captcha_response"/>
<fmt:message key="login_submit" var="login_submit"/>
<fmt:message key="login_reset" var="login_reset"/>

<fmt:message key="loginjsp_label1" var="loginjsp_label1"/>
<fmt:message key="loginjsp_label2" var="loginjsp_label2"/>
<fmt:message key="loginjsp_label3" var="loginjsp_label3"/>
<fmt:message key="loginjsp_label4" var="loginjsp_label4"/>
<fmt:message key="loginjsp_label5" var="loginjsp_label5"/>
<fmt:message key="loginjsp_label6" var="loginjsp_label6"/>
<fmt:message key="loginjsp_label7" var="loginjsp_label7"/>
<fmt:message key="loginjsp_label8" var="loginjsp_label8"/>
<fmt:message key="loginjsp_label9" var="loginjsp_label9"/>
<fmt:message key="loginjsp_label10" var="loginjsp_label10"/>
<fmt:message key="loginjsp_label11" var="loginjsp_label11"/>
<fmt:message key="loginjsp_label12" var="loginjsp_label12"/>
<fmt:message key="loginjsp_label13" var="loginjsp_label13"/>
<fmt:message key="loginjsp_label14" var="loginjsp_label14"/>
<fmt:message key="loginjsp_label15" var="loginjsp_label15"/>

<fmt:message key="login_info_label1" var="login_info_label1"/>
<fmt:message key="login_info_label2" var="login_info_label2"/>
<fmt:message key="login_info_label3" var="login_info_label3"/>
<fmt:message key="login_info_label4" var="login_info_label4"/>
<fmt:message key="login_info_label5" var="login_info_label5"/>
<fmt:message key="login_info_label6" var="login_info_label6"/>
<%
	if(request.getLocale().toString().toLowerCase().startsWith("en")){%>
		<c:set var="languages" value="english" />
	<%
	}else if(request.getLocale().toString().equalsIgnoreCase("zh_hk") || request.getLocale().toString().equalsIgnoreCase("zh_tw") || request.getLocale().toString().equalsIgnoreCase("zh_mo")){
	%>
		<c:set var="languages" value="complexChinese" />
	<%
	}else{
	%>
		<c:set var="languages" value="simpleChinese" />
	<%
	}
%>

<c:set var="url_home"><c:url value="/" /></c:set>

<html>
<head>
<title><fmt:message key="head.title"/></title>
<link href="<c:url value="/themes/mskin/login/new/style.css"/>" rel="stylesheet" type="text/css" />

<script src='<c:url value="/scripts/jquery/jquery-1.6.4.min.js"/>'></script>
<script src="<c:url value="/scripts/prototype/prototype.js"/>" type="text/javascript"></script>
<script src="<c:url value="/scripts/prototype/scriptaculous.js"/>" type="text/javascript"></script>
<script language=javascript src="../cookie.js"></script>
<script language="javascript" for="document" event="onkeydown">
<!--
//-->
</script>
<script language="vbscript">
	Function str2asc(strstr)
	 	str2asc = hex(asc(strstr))
	End Function
	Function asc2str(ascasc)
	 	asc2str = chr(ascasc)
	End Function
</script>

<script type="text/javascript">
	jQuery(function(){
		jQuery(".note_know a").click(function(){
			jQuery("#ie_declare").fadeOut();
		});
		
		var ieVersion = jQuery.browser.version;
		if(ieVersion == undefined || ieVersion == "6.0"){
			jQuery("#ie_declare").show();
		}
	});
	
	function UrlEncode(str){
	  var ret="";
	  var strSpecial="!\"#$%&'()*+,/:;<=>?[]^`{|}~%";
	  var tt= "";
	
	  for(var i=0;i<str.length;i++){
	   var chr = str.charAt(i);
	    var c=str2asc(chr);
	    tt += chr+":"+c+"n";
	    if(parseInt("0x"+c) > 0x7f){
	      ret+="%"+c.slice(0,2)+"%"+c.slice(-2);
	    }else{
	      if(chr==" ")
	        ret+="+";
	      else if(strSpecial.indexOf(chr)!=-1)
	        ret+="%"+c.toString(16);
	      else
	        ret+=chr;
	    }
	  }
	  return ret;
	}
	
	function UrlDecode(str){
	  var ret="";
	  for(var i=0;i<str.length;i++){
	   var chr = str.charAt(i);
	    if(chr == "+"){
	      ret+=" ";
	    }else if(chr=="%"){
	     var asc = str.substring(i+1,i+3);
	     if(parseInt("0x"+asc)>0x7f){
	      ret+=asc2str(parseInt("0x"+asc+str.substring(i+4,i+6)));
	      i+=5;
	     }else{
	      ret+=asc2str(parseInt("0x"+asc));
	      i+=2;
	     }
	    }else{
	      ret+= chr;
	    }
	  }
	  return ret;
	}
	
	function isOnSubmit() {
		if (document.form_static.j_username.value == '') {
			alert("<spring:message text='用户名称不能为空' code='loginjsp_label1' />");
			document.form_static.j_username.focus();
			return false;
		}
		if (document.form_static.j_password.value == '') {
			alert("<spring:message text='用户密码不能为空' code='loginjsp_label2' />");
			document.form_static.j_password.focus();
			return false;
		}
		<% if (!"true".equals(Constants.EAS)) { %>
		if (isChinese(document.form_static.j_username.value)) {
			document.form_static.j_username.value = UrlEncode(document.form_static.j_username.value);
		}
		<% } %>
		return true;
	}
	
	function dyOnSubmit(){
		<% if (!"true".equals(Constants.EAS)) { %>
		if (isChinese(document.form_dynamic.j_username.value)) {
			document.form_dynamic.j_username.value = UrlEncode(document.form_dynamic.j_username.value);
		}
		<% } %>
		return true;
	}
	
	function isChinese(s){
		var ret = false;
		//for(var i=0;i<s.length;i++) {
		//	if(s.charCodeAt(i)>=10000)
		//	return true;
		//}
		return ret;
	}
	
	function efocus(event) {
		//var elem = Event.element(event);
		//elem.style.border = '1 solid #ffb742';
	}
	
	function eblur(event) {
		//var elem = Event.element(event);
		//elem.style.border = '1px solid #0065AA';
	}
	
	function ekeydown(event) {
		if (event.keyCode == Event.KEY_RETURN)
			event.keyCode = Event.KEY_TAB;
	}
	
	function changeMode(obj) {
		//将选择的结果存入cookie，在验证返回后到相应的页
		//并且记录用户上次使用方式
		document.getElementById('login_static').style.display='none';
		<% if ("true".equals(Constants.DYNAMIC)) { %>
			document.getElementById('login_dynamic').style.display='none';
		<% } %>
		<% if ("true".equals(Constants.RTX)) { %>
			document.getElementById('login_rtx').style.display='none';
		<% } %>
		<% if ("true".equals(Constants.UCSTAR)) { %>
			document.getElementById('login_ucstar').style.display='none';
		<% } %>
		document.getElementById('login_'+obj.value).style.display="inline";
		//如果是rtx集成，则需要进行调用自动登
		<% if ("true".equals(Constants.RTX)) { %>
			if (obj.value == 'rtx') {
				document.all.loginRtxButton.click();
			}
		<% } %>
		<% if ("true".equals(Constants.UCSTAR)) { %>
			if (obj.value == 'ucstar') {
				document.all.loginUcstarButton.click();
			}
		<% } %>
		var varselect = document.getElementsByName("selectLoginType");
		var index=0;
		if(obj.value=='static')
		  index=0;
		  if(obj.value=='dynamic')
		  index=1;
		  var i=0;
	
		for (i=0;i<varselect.length;i++){
			varselect[i].options(index).selected=true;
		}
	
	}
	
	function showLoginMessage(){
		<c:if test="${not empty param.login_error}">
			<c:if test="${param.login_error == 'code_error'}">
				alert('${login_error_code_error}');
			</c:if>
			<c:if test="${param.login_error == '1'}">
				alert('${login_error_1}');
			</c:if>
			<c:if test="${param.login_error == '2'}">
				alert('${login_error_2}');
			</c:if>
			<c:if test="${param.login_error == '3'}">
				alert('${login_error_3}');
			</c:if>
			<c:if test="${param.login_error == '4'}">
				alert('${login_error_4}');
			</c:if>
			<c:if test="${param.login_error == '5'}">
				alert('${login_error_5}');
			</c:if>
			<c:if test="${param.login_error == '6'}">
				alert("<spring:message text='License已过期' code='loginjsp_label15' />");
			</c:if>
			<c:if test="${param.login_error == '7'}">
				alert("${login_error_7}");
			</c:if>
			<c:if test="${param.login_error == '8'}">
				alert("${login_error_8}");
			</c:if>
			<c:if test="${param.login_error == '9'}">
				alert("${login_error_9}");
			</c:if>
		</c:if>
	}
	
	<c:set var="url" value="${pageContext.request.contextPath}/components/oahelper/office_addin.msi" />
	function checkOfficeAddIn() {
		if ( !window.ActiveXObject ) return;
		var installed = false;
		var needUpdate = false;
		var newVersion = "<%=Constants.OFFICE_ADDIN_VERSION%>";
		try {
			var o = new ActiveXObject("OAHelperOfficeAddIn.Detector");
			installed = o.IsInstalled();
			var v = o.GetVersion();
			needUpdate = v < newVersion;
		} catch ( exception ) {
		}
		if ( installed !== true ) {
			$("msgOffice").innerHTML = '<spring:message code="loginjsp_label16" arguments="${url}" />';
		}
		if ( needUpdate === true ) {
			$("msgOffice").innerHTML = '<spring:message code="loginjsp_label19" arguments="${url}" />';
		}
	}
	
	
	
	
	<% if (!"0".equals(Constants.LOGIN_COOKIE)) {
		Cookie[] cookies = request.getCookies();
		Cookie temp = null;
		String loginId="";
		if(cookies!=null){
			for(int i = 0;i < cookies.length; i++){
				temp = cookies[i];
				if(temp.getName().equals("loginId"))
					loginId = java.net.URLDecoder.decode(temp.getValue(),"UTF-8");
			}
		}
	%>
	var cookie_loginid = '<%=loginId%>';
	
	if (cookie_loginid == null) cookie_loginid = '';
	var cookie_authmode = Get_Cookie("authMode");
	if (cookie_authmode == null) cookie_authmode = 'static';
	if (cookie_authmode == 'dynamic') {
		<% if ("true".equals(Constants.DYNAMIC)) { %>
			document.getElementById('j_mode_dynamic').click();
			document.form_dynamic.j_username.value = cookie_loginid;
		<% } %>
	} else {
		if (cookie_authmode == 'rtx') {
			<% if ("true".equals(Constants.RTX)) { %>
			document.getElementById('j_mode_rtx').click();
			<% } %>
		} else if (cookie_authmode == 'ucstar') {
			<% if ("true".equals(Constants.UCSTAR)) { %>
			document.getElementById('j_mode_ucstar').click();
			<% } %>
		} else {
			<% if ("true".equals(Constants.DYNAMIC) || "true".equals(Constants.RTX) || "true".equals(Constants.UCSTAR)) { %>
				document.getElementById('j_mode_static').click();
			<% } %>
			document.form_static.j_username.value = cookie_loginid;
		}
	}
	<% } %>
	
	Set_Cookie('userClose','0','','/','','');
	
	function changeL(locale){
		Set_Cookie('clientlanguage',locale,'365','/','','');
	}
	
	//dexiang_lei 2012-3-22 清除导航的cookie 
	function deleteHeaderTabCookie() {
		if(Get_Cookie("leftMoveTimeCount") != null) {
			Delete_Cookie("leftMoveTimeCount",'/','');
		}
		if(Get_Cookie("rightMoveTimeCount") != null) {
			Delete_Cookie("rightMoveTimeCount",'/','');
		}
	}
</script>
</head>

<body id="login" onload="showLoginMessage();" style="background-color: <%=loginBackGroundColor %>">
<c:choose>
	<c:when test="${loginTheme == '1'}">
		<c:set var="loginImageUrl" value="${loginImageContextPath}login_bg_1.jpg"></c:set>
		<c:set var="loginInputColor" value="#0065AA"></c:set>
		<c:set var="buttonLoginColor" value="#ffffff"></c:set>
		<c:set var="buttonResetColor" value="#ffffff"></c:set>
		<c:set var="loginTxtColor" value="#024679"></c:set>
		<c:set var="declareColor" value="#A6DFF6"></c:set>
		<c:set var="buttonLoginImgUrl" value="${loginImageContextPath}login_btn1.jpg"></c:set>
		<c:set var="buttonResetImgUrl" value="${loginImageContextPath}reset_btn1.jpg"></c:set>
		<c:set var="declareTop" value="388px"></c:set>
		<c:set var="declareLeft" value="590px"></c:set>		
	</c:when>
	<c:when test="${loginTheme == '2'}">
		<c:set var="loginImageUrl" value="${loginImageContextPath}login_bg_2.jpg"></c:set>
		<c:set var="loginInputColor" value="#8f6336"></c:set>
		<c:set var="buttonLoginColor" value="#ffffff"></c:set>
		<c:set var="buttonResetColor" value="#770400"></c:set>
		<c:set var="loginTxtColor" value="#593e24"></c:set>
		<c:set var="declareColor" value="#916752"></c:set>
		<c:set var="buttonLoginImgUrl" value="${loginImageContextPath}login_btn2.jpg"></c:set>
		<c:set var="buttonResetImgUrl" value="${loginImageContextPath}reset_btn2.jpg"></c:set>
		<c:set var="declareTop" value="429px"></c:set>
		<c:set var="declareLeft" value="597px"></c:set>		
	</c:when>
	<c:when test="${loginTheme == '3'}">
		<c:set var="loginImageUrl" value="${loginImageContextPath}login_bg_3.jpg"></c:set>
		<c:set var="loginInputColor" value="#086901"></c:set>
		<c:set var="buttonLoginColor" value="#ffffff"></c:set>
		<c:set var="buttonResetColor" value="#770400"></c:set>
		<c:set var="loginTxtColor" value="#086901"></c:set>
		<c:set var="declareColor" value="#e2f3d9"></c:set>
		<c:set var="buttonLoginImgUrl" value="${loginImageContextPath}login_btn3.jpg"></c:set>
		<c:set var="buttonResetImgUrl" value="${loginImageContextPath}reset_btn3.jpg"></c:set>
		<c:set var="declareTop" value="429px"></c:set>
		<c:set var="declareLeft" value="597px"></c:set>		
	</c:when>
	<c:otherwise>
		<c:set var="loginInputColor" value="#0065AA"></c:set>
		<c:set var="buttonLoginColor" value="#ffffff"></c:set>
		<c:set var="buttonResetColor" value="#ffffff"></c:set>
		<c:set var="loginTxtColor" value="#024679"></c:set>
		<c:set var="declareColor" value="#A6DFF6"></c:set>
		<c:set var="buttonLoginImgUrl" value="${loginImageContextPath}login_btn1.jpg"></c:set>
		<c:set var="buttonResetImgUrl" value="${loginImageContextPath}reset_btn1.jpg"></c:set>
		<c:set var="declareTop" value="388px"></c:set>
		<c:set var="declareLeft" value="590px"></c:set>		
		<c:choose>
			<c:when test="${loginImageType == 'swf' || loginImageType == 'SWF'}">
				<div style="position:absolute;z-index:-1">
					<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="100%" height="634">
						<param name="movie" value="<c:url value="/themes/mskin/login/new/images/${loginImageName }"/>" />
						<param name="wmode" value="transparent" />
					</object>
				</div>
				<c:set var="loginImageUrl" value=""></c:set>
			</c:when>
			<c:otherwise>
				<c:set var="loginImageUrl" value="${loginImageContextPath}${loginImageName }"></c:set>
			</c:otherwise>
		</c:choose>
	</c:otherwise>
</c:choose>

<style>
.login_input{
	border: 1px solid ${loginInputColor};
	font-size: 12px;
	background-color: #ffffff;
	vertical-align: middle;
	height:22px;
}
.button_login {
	border:0px solid;
	font-size: 14px; 
	color:${buttonLoginColor}; 
	width:95px;
	height:35px;
	font-weight:bold;
    background-image: url(${buttonLoginImgUrl});
}
.button_reset {
	border:0px solid;
	font-size: 14px; 
	color:${buttonResetColor}; 
	width:95px;
	height:35px;
	font-weight:bold;
    background-image: url(${buttonResetImgUrl});
}

.loginTxt{color:${loginTxtColor};font-size: 12px;}
.declare{color:${declareColor};font-size: 12px;text-decoration:none;}
#ie_declare{position:absolute;left:${declareLeft};top:${declareTop};width:171px;height:79px;z-index:1;}
</style>

<%-- --------------------IE版本提示框----------------------- --%>
<div id="ie_declare" style="display: none">
	<table width="260" border="0" cellspacing="0" cellpadding="0"  class="ie_declare_bg">
		<tr>
			<td height="60">${login_info_label1}<br/>${login_info_label2}</td>
		</tr>
		<tr>
			<td>
				<table width="90%" border="0" cellspacing="0" cellpadding="0">
					<tr>
						<td>&nbsp;</td>
						<td class="note_download"><a href="http://windows.microsoft.com/zh-CN/internet-explorer/downloads/ie-8" target="_blank">${login_info_label3}</a>&nbsp;&nbsp;&nbsp;&nbsp;</td>
						<td class="note_know"><a href="javascript:void(0)">${login_info_label4}</a></td>
					</tr>
				</table>
			</td>
		</tr>
	</table>
</div>

<table width="100%" height="634" border="0" cellspacing="0" cellpadding="0">
	<tr>
		<td style="background:url(${loginImageUrl}) no-repeat center center;height:100%;" valign="top">
			
			<c:choose>
				<%-- ----------------------------预设1、自定义-------------------------------- --%>
				<c:when test="${loginTheme == '1' || loginTheme == '4'}">
					<table width="100%" border="0" cellpadding="0" cellspacing="0">
						<tr>
					        <td width="59%" height="400">&nbsp;</td>
					        <td width="41%" align="center">
					        	
					        	<%-- ----------------------------基础------------------------------- --%>
					        	<div id="login_static">
						        	<%if("true".equals(Constants.EAS)) { %>
						            <form name="form_static" method="post" action='<c:url value="/login/kingdee_sso_auth.jsp" />' onsubmit="return isOnSubmit();">
						            <%}else{%>
						            <form name="form_static" method="post" action='<c:url value="/j_acegi_security_check" />' onSubmit="return isOnSubmit();">
						            <%}%>
							            <input id="j_mode" type="hidden" name="j_mode" value="static">
							        	<table width="70%" border="0" cellspacing="0" cellpadding="0">
							        		<tr>
							        			<td height="150" colspan="2" class="logintxt">&nbsp;</td>
							        		</tr>
							        		
							        		<tr>
							        			<td width="25%" height="30" class="logintxt">${login_info_label5}</td>
							        			<td height="30" align="left">
							        			<c:set var="clientlanguage">${cookie['clientlanguage'].value}</c:set>
												  <c:if test="${cookie['clientlanguage'].value==null || cookie['clientlanguage'].value==''}">
							                      	<c:set var="clientlanguage"><%=request.getLocale().toString()%></c:set>
							                      </c:if>
							        				<select name="j_locale" style="width:120px" onChange="changeL(this.value)">
							        					<option value="zh_CN">简体</option>
								                        <option value="zh_HK" <c:if test="${clientlanguage == 'zh_HK'}">selected</c:if>>繁體</option>
							                            <%if(ContextUtils.getInterfaceLicense("lang_en")){ %>
							                            <option value="en_US" <c:if test="${ clientlanguage == 'en_US'}">selected</c:if>>English</option>
							                            <%} %>
		                       						</select>
				                  				</td>
				                  			</tr>
				                  			
				                  			<%if("true".equals(Constants.DYNAMIC) || "true".equals(Constants.RTX) || "true".equals(Constants.UCSTAR)) { %>
				                  			<tr>
				                  				<td height="30" class="logintxt">${login_info_label6}</td>
				                  				<td height="30" align="left">
				                  					<select onChange="changeMode(this);"  name="selectLoginType"  style="width:120px">
				                  						<option value="static"><spring:message text='系统密码' code='loginjsp_label5'/></option>
							                            <%if(ContextUtils.getInterfaceLicense("dynamic")&&"true".equals(Constants.DYNAMIC)) { %>
							                            <option value="dynamic" ><spring:message text='动态密码' code='loginjsp_label6'/></option>
							                            <%}%>
							                            <%if("true".equals(Constants.RTX)) { %>
							                            <option value="rtx"><spring:message text='RTX登录' code='loginjsp_label7'/></option>
							                            <%}%>
							                            <%if( ContextUtils.getInterfaceLicense("im")&&"true".equals(Constants.UCSTAR) ) { %>
							                            <option value="ucstar"><spring:message text="UcSTAR集成" code="loginjsp_label17"/></option>
							                            <%}%>
		                       						</select>
				                  				</td>
				                  			</tr> 
				                  			<%} %>
				                  			
				                  			<tr>
				                  				<td height="30" class="logintxt">${login_username}</td>
				                  				<td height="30" align="left">
				                  					<input name="j_username" type="text" class="login_input" style="width:120px;" onfocus="efocus(event);" onBlur="eblur(event);" onKeyDown="ekeydown(event)" maxlength="50" />
				                  				</td>
				                  			</tr>
				                  			
				                  			<tr>
				                  				<td height="30" class="logintxt">${login_password}</td>
				                  				<td height="30" align="left">
				                  					<input name="j_password" type="password" class="login_input" style="width:120px;" onfocus="efocus(event);" onBlur="eblur(event);"  <%if(Constants.IMAGERAND){%> onKeyDown="ekeydown(event)" <%} %>  maxlength="25" />
				                  				</td>
				                  			</tr>
				                  			
				                  			<%if(Constants.IMAGERAND){%>
				                  			<tr>
				                  				<td height="30" class="logintxt">${login_j_captcha_response}</td>
				                  				<td height="30" align="left">
				                  					<input name="j_captcha_response" type="text" class="login_input" size="18" onfocus="efocus(event);" onBlur="eblur(event);" maxlength="4" />
				                  					<img align='absmiddle' src="<c:url value="/common/image.jpg" />">
				                  				</td>
				                  			</tr>
				                  			<%}%>
				                  			
				                  			<tr>
				                  				<td height="55" colspan="2" align="center">
				                  					<input type="submit" name="Submit" value="${login_submit}" onclick="deleteHeaderTabCookie();" class="button_login"/>
				                  					<input type="reset" name="Submit2" value="${login_reset}" class="button_reset"/>
				                  				</td>
				                  			</tr>
											<tr>
											　　<td colspan="2">＝＝＝＝开发测试＝＝＝＝</td>
							        		</tr>
				                  		</table>
			                  		</form>
		                  		</div>
		                  		
		                  		<%-- ----------------------------动态密码--------------------------- --%>
		                  		<%if("true".equals(Constants.DYNAMIC)) { %>
		                  		<div id="login_dynamic" style="display:none">
		                  			<form name="form_dynamic" method="post" action='<c:url value="/j_acegi_security_check" />' onSubmit="return dyOnSubmit();">
	                					<input id="j_mode" type="hidden" name="j_mode" value="dynamic">
			                  			<table width="70%" border="0" cellspacing="0" cellpadding="0">
							        		<tr>
							        			<td height="150" colspan="2" class="logintxt">&nbsp;</td>
							        		</tr>
							        		
							        		<tr>
							        			<td width="25%" height="30" class="logintxt">&nbsp;</td>
							        			<td height="30" align="left">&nbsp;</td>
				                  			</tr>
				                  			
				                  			<%if("true".equals(Constants.DYNAMIC) || "true".equals(Constants.RTX) || "true".equals(Constants.UCSTAR)) { %>
				                  			<tr>
				                  				<td height="30" class="logintxt">${login_info_label6}</td>
				                  				<td height="30" align="left">
				                  					<select onChange="changeMode(this);"  name="selectLoginType"  style="width:120px">
				                  						<option value="static"><spring:message text='系统密码' code='loginjsp_label5'/></option>
							                            <%if("true".equals(Constants.DYNAMIC)) { %>
							                            <option value="dynamic" ><spring:message text='动态密码' code='loginjsp_label6'/></option>
							                            <%}%>
							                            <%if("true".equals(Constants.RTX)) { %>
							                            <option value="rtx"><spring:message text='RTX登录' code='loginjsp_label7'/></option>
							                            <%}%>
							                            <%if( "true".equals(Constants.UCSTAR) ) { %>
							                            <option value="ucstar"><spring:message text="UcSTAR集成" code="loginjsp_label17"/></option>
							                            <%}%>
		                       						</select>
				                  				</td>
				                  			</tr> 
				                  			<%} %>
				                  			
				                  			<tr>
				                  				<td height="30" class="logintxt">${login_username}</td>
				                  				<td height="30" align="left">
				                  					<input name="j_username" type="text" class="login_input" style="width:120px;" onfocus="efocus(event);" onBlur="eblur(event);" onKeyDown="ekeydown(event)" maxlength="50" />
				                  				</td>
				                  			</tr>
				                  			
				                  			<tr>
				                  				<td height="30" class="logintxt">${login_password}</td>
				                  				<td height="30" align="left">
				                  					<input name="j_password" type="password" class="login_input" style="width:120px;" onfocus="efocus(event);" onBlur="eblur(event);"  <%if(Constants.IMAGERAND){%> onKeyDown="ekeydown(event)" <%} %>  maxlength="25" />
				                  				</td>
				                  			</tr>
				                  			
				                  			<tr>
				                  				<td height="55" colspan="2" align="center">
				                  					<input type="submit" name="Submit" value="${login_submit}" class="button_login"/>
				                  					<input type="reset" name="Submit2" value="${login_reset}" class="button_reset"/>
				                  				</td>
				                  			</tr>
				                  		</table>
				                  	</form>
			                  	</div>
		                  		<%}%>
		                  		
		                  		
		                  		<%-- ----------------------------RTX------------------------------- --%>
		                  		<%if("true".equals(Constants.RTX)) { %>
		                  		<div id="login_rtx" style="display:none">
		                  			<script language="vbscript" id="clientEventHandlersVBS">
									<!--
									Function loginRtx()
										on error resume next
										'<spring:message text='得到帐号' code='loginjsp_label8' />
										Set objKernal = RTXAX.GetObject("KernalRoot")
                                        
										Account = objKernal.Account
                                       
										set objSign = objKernal.Sign

										If Account = "" Then
	   										MsgBox "<spring:message text='您未登录RTX，请先登录到RTX' code='loginjsp_label9' />！"
										Else
											'MsgBox "<spring:message text='当前用户' code='loginjsp_label10' />：" & Account
											'MsgBox "<spring:message text='数字证书' code='loginjsp_label11' />：" & objSign.GetString("Sign")
											'<spring:message text='开始提交表单' code='loginjsp_label12' />

											If isChinese(Account) Then
												Account = UrlEncode(Account)
											End If


											form_rtx.j_username.value = Account
											'<spring:message text='暂时不要用RTX的签名，因为跨平台验证还不能实现' code='loginjsp_label13' />
											'form_rtx.j_password.value = objSign.GetString("Sign")
											form_rtx.submit
										End If
									End Function
									-->
      								</script>
						            <OBJECT id=RTXAX data=data:application/x-oleobject;base64,fajuXg4WLUqEJ7bDM/7aTQADAAAaAAAAGgAAAA==
											classid=clsid:5EEEA87D-160E-4A2D-8427-B6C333FEDA4D VIEWASTEXT>
						            </OBJECT>
			                  		<form name="form_rtx" id="form_rtx" method="post" action='<c:url value="/j_acegi_security_check" />'>
						                <input id="j_mode" type="hidden" name="j_mode" value="rtx">
						                <input id="j_username" name="j_username" type="hidden" value="">
						                <input id="j_password" name="j_password" type="hidden" value="<%=session.getId()%>">
			                  			<table width="70%" border="0" cellspacing="0" cellpadding="0">
							        		<tr>
							        			<td height="150" colspan="2" class="logintxt">&nbsp;</td>
							        		</tr>
							        		
							        		<tr>
							        			<td width="25%" colspan="2" height="120" class="logintxt">
							        				<spring:message text='如果您的计算机已经成功登录了RTX，OA系统会自动登录到，如果您看到此信息，可能您没有正确登录RTX，请先登录RTX，然后点[登录]按钮。' code='loginjsp_label14' />
							        			</td>
				                  			</tr>
				                  			
				                  			<tr>
				                  				<td height="55" colspan="2" align="center">
				                  					<input type="button" name="loginRtxButton" id="loginRtxButton" value="${login_submit}" class="button_login" onClick="loginRtx()" />
				                  					<input type="button" value="<spring:message text='&nbsp;返&nbsp;&nbsp;回&nbsp' code='common_return2' />" class="button_reset" onclick="javascript:window.location.href='${url_home}';return false;" />
				                  				</td>
				                  			</tr>
				                  		</table>
						            </form>
					            </div>
		                  		<%}%>
		                  		
		                  		
		                  		<%-- ----------------------------IM-------------------------------- --%>
		                  		<%if("true".equals(Constants.UCSTAR)) { %>
		                  		<div id="login_ucstar" style="display:none">
		                  			<script language="javascript" >
										function loginByUcstar() {
											var o = isUcstarOnline();
											if ( !o.isOnline ) {
												alert("您未登录UCSTAR，请先登录到UCSTAR");
												return false;
											}
											
											try {
												var name = uc_objectCtrl.GetLoginName();
											//	alert("GetLoginName=" + name);
												if ( typeof(name) == "string" && name != "" ) {
													form_ucstar.j_username.value = name;
													form_ucstar.submit();
												} else {
													alert("您未登录UCSTAR，请先登录到UCSTAR");
													return false;
												}
											} catch ( ex ) {
												alert("发生异常：" + ex.message);
												return false;
											}
											return true;
										}
										
										try {
											uc_registerWinOnload();
										} catch ( ex ) {
										}
      								</script>
		                  			<form name="form_ucstar" id="form_ucstar" method="post" action='<c:url value="/j_acegi_security_check" />'>
						                <input id="j_mode" type="hidden" name="j_mode" value="ucstar">
						                <input id="j_username" name="j_username" type="hidden" value="">
						                <input id="j_password" name="j_password" type="hidden" value="<%=session.getId()%>">
						        		<table width="70%" border="0" cellspacing="0" cellpadding="0">
							        		<tr>
							        			<td height="150" colspan="2" class="logintxt">&nbsp;</td>
							        		</tr>
							        		
							        		<tr>
							        			<td width="25%" colspan="2" height="120" class="logintxt">
							        				<spring:message text="如果您的计算机已经成功登录了UcSTAR，OA系统会自动登录到。如果您看到此信息，可能您没有正确登录UcSTAR。请先登录UcSTAR，然后点[登录]按钮。" code="loginjsp_label18" />
							        			</td>
				                  			</tr>
				                  			
				                  			<tr>
				                  				<td height="55" colspan="2" align="center">
				                  					<input type="button" name="loginUcstarButton" id="loginUcstarButton" value="${login_submit}" class="button_login" onClick="loginByUcstar()" />
				                                	<input type="button" value="<spring:message text='&nbsp;返&nbsp;&nbsp;回&nbsp' code='common_return2' />" class="button_reset" onclick="javascript:window.location.href='${url_home}';return false;" />
				                  				</td>
				                  			</tr>
				                  		</table>
						        	</form>
		                  		</div>
		                  		<%}%>
		                  		
					        </td>
					    </tr>
		      			<tr height="210">
		        			<td colspan="2" align="center">
		        				<div style="margin-bottom: 15px;" class="declare" id="msgOffice">&nbsp;</div>
		        				<c:if test="${languages==null || languages=='simpleChinese'}">
		        					<a href="javascript:void(0);" class="declare" onClick="javascript:window.open('<c:url value="/help/client.jsp"/>');">
              							<spring:message text='客户端环境要求' code='loginjsp_label3' />
              						</a>
              					</c:if>
          						<c:if test="${languages!=null && languages=='complexChinese'}">
          							<a href="javascript:void(0);" class="declare" onClick="javascript:window.open('<c:url value="/help/client_zh_HK.jsp"/>');">
              							<spring:message text='客户端环境要求' code='loginjsp_label3' />
              						</a>
              					</c:if>
          						<c:if test="${languages!=null && languages=='english'}">
          							<a href="javascript:void(0);" class="declare" onClick="javascript:window.open('<c:url value="/help/client_en.jsp"/>');">
              							<spring:message text='客户端环境要求' code='loginjsp_label3' />
              						</a>
              					</c:if>
		        			</td>
		        		</tr>
		    		</table>
				</c:when>
				
				
				<%-- ----------------------------预设2--------------------------------------- --%>
				<c:when test="${loginTheme == '2'}">
				
					<%-- ----------------------------基础------------------------------- --%>
					<div id="login_static">
						<%if("true".equals(Constants.EAS)) { %>
			            <form name="form_static" method="post" action='<c:url value="/login/kingdee_sso_auth.jsp" />' onsubmit="return isOnSubmit();">
			            <%}else{%>
			            <form name="form_static" method="post" action='<c:url value="/j_acegi_security_check" />' onSubmit="return isOnSubmit();">
			            <%}%>
				            <input id="j_mode" type="hidden" name="j_mode" value="static">
							<table width="100%" border="0" cellpadding="0" cellspacing="0">
								<tr>
									<td height="366">&nbsp;</td>
								</tr>
								<tr>
									<td height="80" valign="top">
										<table width="600px" border="0" align="center" cellpadding="0" cellspacing="0">
											<tr>
												<td height="26" class="logintxt">${login_info_label5}</td>
												<td align="left">
													<c:set var="clientlanguage">${cookie['clientlanguage'].value}</c:set>
												  <c:if test="${cookie['clientlanguage'].value==null || cookie['clientlanguage'].value==''}">
							                      	<c:set var="clientlanguage"><%=request.getLocale().toString()%></c:set>
							                      </c:if>
													<select name="j_locale" style="width:120px" onChange="changeL(this.value)">
							        					<option value="zh_CN">简体</option>
								                        <option value="zh_HK" <c:if test="${clientlanguage == 'zh_HK'}">selected</c:if>>繁體</option>
							                            <%if(ContextUtils.getInterfaceLicense("lang_en")){ %>
							                            <option value="en_US" <c:if test="${clientlanguage == 'en_US'}">selected</c:if>>English</option>
							                            <%} %>
		                       						</select>
												</td>
												<%if("true".equals(Constants.DYNAMIC) || "true".equals(Constants.RTX) || "true".equals(Constants.UCSTAR)) { %>
												<td class="logintxt">${login_info_label6}</td>
												<td align="left">
													<select onChange="changeMode(this);"  name="selectLoginType"  style="width:120px">
				                  						<option value="static"><spring:message text='系统密码' code='loginjsp_label5'/></option>
							                            <%if(ContextUtils.getInterfaceLicense("dynamic")&&"true".equals(Constants.DYNAMIC)) { %>
							                            <option value="dynamic" ><spring:message text='动态密码' code='loginjsp_label6'/></option>
							                            <%}%>
							                            <%if("true".equals(Constants.RTX)) { %>
							                            <option value="rtx"><spring:message text='RTX登录' code='loginjsp_label7'/></option>
							                            <%}%>
							                            <%if( ContextUtils.getInterfaceLicense("im")&&"true".equals(Constants.UCSTAR) ) { %>
							                            <option value="ucstar"><spring:message text="UcSTAR集成" code="loginjsp_label17"/></option>
							                            <%}%>
		                       						</select>
												</td>
												<%} %>
											</tr>
											<tr>
												<td height="26" class="logintxt">${login_username}</td>
												<td align="left">
													<input name="j_username" type="text" class="login_input" style="width:120px;" onfocus="efocus(event);" onBlur="eblur(event);" onKeyDown="ekeydown(event)" maxlength="50" />
												</td>
												<td align="left">
													<span class="logintxt">${login_password}</span>
												</td>
												<td align="left">
													<input name="j_password" type="password" class="login_input" style="width:120px;" onfocus="efocus(event);" onBlur="eblur(event);"  <%if(Constants.IMAGERAND){%> onKeyDown="ekeydown(event)" <%} %>  maxlength="25" />
												</td>
											</tr>
											<%if(Constants.IMAGERAND){%>
											<tr>
												<td height="22" class="logintxt">${login_j_captcha_response}</td>
												<td align="left" colspan="3">
													<input name="j_captcha_response" type="text" class="login_input" size="18" onfocus="efocus(event);" onBlur="eblur(event);" maxlength="4" />
				                  					<img align='absmiddle' src="<c:url value="/common/image.jpg" />">
												</td>
											</tr>
											<%}%>
										</table>
									</td>
								</tr>
								<tr>
									<td valign="top">
										<table width="60%" border="0" align="center" cellpadding="0" cellspacing="0">
											<tr>
												<td height="62" align="center" colspan="4">
													<input type="submit" name="Submit" value="${login_submit}" class="button_login"/>
				                  					<input type="reset" name="Submit2" value="${login_reset}" class="button_reset"/>
												</td>
											</tr>
										</table>
									</td>
								</tr>
							</table>
						</form>
					</div>
					
					<%-- ----------------------------动态密码--------------------------- --%>
					<%if("true".equals(Constants.DYNAMIC)) { %>
               		<div id="login_dynamic" style="display:none">
               			<form name="form_dynamic" method="post" action='<c:url value="/j_acegi_security_check" />' onSubmit="return dyOnSubmit();">
           					<input id="j_mode" type="hidden" name="j_mode" value="dynamic">
           					<table width="100%" border="0" cellpadding="0" cellspacing="0">
								<tr>
									<td height="366">&nbsp;</td>
								</tr>
								<tr>
									<td height="80" valign="top">
										<table width="60%" border="0" align="center" cellpadding="0" cellspacing="0">
											<tr>
												<%if("true".equals(Constants.DYNAMIC) || "true".equals(Constants.RTX) || "true".equals(Constants.UCSTAR)) { %>
												<td height="26" class="logintxt">${login_info_label6}</td>
												<td align="left" colspan="3">
													<select onChange="changeMode(this);"  name="selectLoginType"  style="width:120px">
				                  						<option value="static"><spring:message text='系统密码' code='loginjsp_label5'/></option>
							                            <%if("true".equals(Constants.DYNAMIC)) { %>
							                            <option value="dynamic" ><spring:message text='动态密码' code='loginjsp_label6'/></option>
							                            <%}%>
							                            <%if("true".equals(Constants.RTX)) { %>
							                            <option value="rtx"><spring:message text='RTX登录' code='loginjsp_label7'/></option>
							                            <%}%>
							                            <%if( "true".equals(Constants.UCSTAR) ) { %>
							                            <option value="ucstar"><spring:message text="UcSTAR集成" code="loginjsp_label17"/></option>
							                            <%}%>
		                       						</select>
												</td>
												<%} %>
											</tr>
											<tr>
												<td height="26" class="logintxt">${login_username}</td>
												<td align="left">
													<input name="j_username" type="text" class="login_input" style="width:120px;" onfocus="efocus(event);" onBlur="eblur(event);" onKeyDown="ekeydown(event)" maxlength="50" />
												</td>
												<td align="left">
													<span class="logintxt">${login_password}</span>
												</td>
												<td align="left">
													<input name="j_password" type="password" class="login_input" style="width:120px;" onfocus="efocus(event);" onBlur="eblur(event);"  <%if(Constants.IMAGERAND){%> onKeyDown="ekeydown(event)" <%} %>  maxlength="25" />
												</td>
											</tr>
											
										</table>
									</td>
								</tr>
								<tr>
									<td valign="top">
										<table width="60%" border="0" align="center" cellpadding="0" cellspacing="0">
											<tr>
												<td height="62" align="center" colspan="4">
													<input type="submit" name="Submit" value="${login_submit}" class="button_login"/>
				                  					<input type="reset" name="Submit2" value="${login_reset}" class="button_reset"/>
												</td>
											</tr>
										</table>
									</td>
								</tr>
							</table>
           				</form>
               		</div>
                 	<%} %>
					
					<%-- ----------------------------RTX------------------------------- --%>
					<%if("true".equals(Constants.RTX)) { %>
					<div id="login_rtx" style="display:none">
						<script language="vbscript" id="clientEventHandlersVBS">
						<!--
						Function loginRtx()
							on error resume next
							'<spring:message text='得到帐号' code='loginjsp_label8' />
							Set objKernal = RTXAX.GetObject("KernalRoot")
                                        
							Account = objKernal.Account
                                       
							set objSign = objKernal.Sign

							If Account = "" Then
								MsgBox "<spring:message text='您未登录RTX，请先登录到RTX' code='loginjsp_label9' />！"
							Else
								'MsgBox "<spring:message text='当前用户' code='loginjsp_label10' />：" & Account
								'MsgBox "<spring:message text='数字证书' code='loginjsp_label11' />：" & objSign.GetString("Sign")
								'<spring:message text='开始提交表单' code='loginjsp_label12' />

								If isChinese(Account) Then
									Account = UrlEncode(Account)
								End If


								form_rtx.j_username.value = Account
								'<spring:message text='暂时不要用RTX的签名，因为跨平台验证还不能实现' code='loginjsp_label13' />
								'form_rtx.j_password.value = objSign.GetString("Sign")
								form_rtx.submit
							End If
						End Function
						-->
    					</script>
			            <OBJECT id=RTXAX data=data:application/x-oleobject;base64,fajuXg4WLUqEJ7bDM/7aTQADAAAaAAAAGgAAAA==
								classid=clsid:5EEEA87D-160E-4A2D-8427-B6C333FEDA4D VIEWASTEXT>
			            </OBJECT>
			            <form name="form_rtx" id="form_rtx" method="post" action='<c:url value="/j_acegi_security_check" />'>
			                <input id="j_mode" type="hidden" name="j_mode" value="rtx">
			                <input id="j_username" name="j_username" type="hidden" value="">
			                <input id="j_password" name="j_password" type="hidden" value="<%=session.getId()%>">
			                
			                <table width="100%" border="0" cellpadding="0" cellspacing="0">
								<tr>
									<td height="366">&nbsp;</td>
								</tr>
								<tr>
									<td height="80" valign="top">
										<table width="60%" border="0" align="center" cellpadding="0" cellspacing="0">
											<tr>
												<td class="logintxt">
													<spring:message text='如果您的计算机已经成功登录了RTX，OA系统会自动登录到，如果您看到此信息，可能您没有正确登录RTX，请先登录RTX，然后点[登录]按钮。' code='loginjsp_label14' />
												</td>
											</tr>
										</table>
									</td>
								</tr>
								<tr>
									<td valign="top">
										<table width="60%" border="0" align="center" cellpadding="0" cellspacing="0">
											<tr>
												<td height="62" align="center" colspan="4">
													<input type="button" name="loginRtxButton" id="loginRtxButton" value="${login_submit}" class="button_login" onClick="loginRtx()" />
				                  					<input type="button" value="<spring:message text='&nbsp;返&nbsp;&nbsp;回&nbsp' code='common_return2' />" class="button_reset" onclick="javascript:window.location.href='${url_home}';return false;" />
												</td>
											</tr>
										</table>
									</td>
								</tr>
							</table>
						</form>
					</div>
					<%} %>
					
					<%-- ----------------------------IM-------------------------------- --%>
					<%if("true".equals(Constants.UCSTAR)) { %>
		            <div id="login_ucstar" style="display:none">
		            	<script language="javascript" >
							function loginByUcstar() {
								var o = isUcstarOnline();
								if ( !o.isOnline ) {
									alert("您未登录UCSTAR，请先登录到UCSTAR");
									return false;
								}
								
								try {
									var name = uc_objectCtrl.GetLoginName();
								//	alert("GetLoginName=" + name);
									if ( typeof(name) == "string" && name != "" ) {
										form_ucstar.j_username.value = name;
										form_ucstar.submit();
									} else {
										alert("您未登录UCSTAR，请先登录到UCSTAR");
										return false;
									}
								} catch ( ex ) {
									alert("发生异常：" + ex.message);
									return false;
								}
								return true;
							}
							
							try {
								uc_registerWinOnload();
							} catch ( ex ) {
							}
 						</script>
		            	<form name="form_ucstar" id="form_ucstar" method="post" action='<c:url value="/j_acegi_security_check" />'>
			                <input id="j_mode" type="hidden" name="j_mode" value="ucstar">
			                <input id="j_username" name="j_username" type="hidden" value="">
			                <input id="j_password" name="j_password" type="hidden" value="<%=session.getId()%>">
			                <table width="100%" border="0" cellpadding="0" cellspacing="0">
								<tr>
									<td height="366">&nbsp;</td>
								</tr>
								<tr>
									<td height="80" valign="top">
										<table width="60%" border="0" align="center" cellpadding="0" cellspacing="0">
											<tr>
												<td class="logintxt">
													<spring:message text="如果您的计算机已经成功登录了UcSTAR，OA系统会自动登录到。如果您看到此信息，可能您没有正确登录UcSTAR。请先登录UcSTAR，然后点[登录]按钮。" code="loginjsp_label18" />
												</td>
											</tr>
										</table>
									</td>
								</tr>
								<tr>
									<td valign="top">
										<table width="60%" border="0" align="center" cellpadding="0" cellspacing="0">
											<tr>
												<td height="62" align="center" colspan="4">
													<input type="button" name="loginUcstarButton" id="loginUcstarButton" value="${login_submit}" class="button_login" onClick="loginByUcstar()" />
				                                	<input type="button" value="<spring:message text='&nbsp;返&nbsp;&nbsp;回&nbsp' code='common_return2' />" class="button_reset" onclick="javascript:window.location.href='${url_home}';return false;" />
												</td>
											</tr>
										</table>
									</td>
								</tr>
							</table>
		                </form>
		            </div>
		            <%} %>
		            
					<table width="60%" border="0" align="center" cellpadding="0" cellspacing="0">
						<tr>
							<td height="78" align="center" valign="top">
								<div style="margin-bottom: 15px;" class="declare" id="msgOffice">&nbsp;</div>
								<c:if test="${languages==null || languages=='simpleChinese'}">
		        					<a href="javascript:void(0);" class="declare" onClick="javascript:window.open('<c:url value="/help/client.jsp"/>');">
              							<spring:message text='客户端环境要求' code='loginjsp_label3' />
              						</a>
              					</c:if>
          						<c:if test="${languages!=null && languages=='complexChinese'}">
          							<a href="javascript:void(0);" class="declare" onClick="javascript:window.open('<c:url value="/help/client_zh_HK.jsp"/>');">
              							<spring:message text='客户端环境要求' code='loginjsp_label3' />
              						</a>
              					</c:if>
          						<c:if test="${languages!=null && languages=='english'}">
          							<a href="javascript:void(0);" class="declare" onClick="javascript:window.open('<c:url value="/help/client_en.jsp"/>');">
              							<spring:message text='客户端环境要求' code='loginjsp_label3' />
              						</a>
              					</c:if>
							</td>
						</tr>
					</table>
				</c:when>
				
				<%-- ----------------------------预设3--------------------------------------- --%>
				<c:when test="${loginTheme == '3'}">
					
					<table width="100%" border="0" cellpadding="0" cellspacing="0">
						<tr>
							<td width="33%" height="480">&nbsp;</td>
							<td width="67%" align="left" valign="top">
							
								<%-- ----------------------------基础------------------------------- --%>
								<div id="login_static">
									<%if("true".equals(Constants.EAS)) { %>
						            <form name="form_static" method="post" action='<c:url value="/login/kingdee_sso_auth.jsp" />' onsubmit="return isOnSubmit();">
						            <%}else{%>
						            <form name="form_static" method="post" action='<c:url value="/j_acegi_security_check" />' onSubmit="return isOnSubmit();">
						            <%}%>
						            	<input id="j_mode" type="hidden" name="j_mode" value="static">
										<table width="58%" border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td height="270" colspan="2">&nbsp;</td>
											</tr>
											<tr>
												<td height="30" align="center" width="28%" class="logintxt">${login_info_label5}</td>
												<td height="30" align="left">
													<c:set var="clientlanguage">${cookie['clientlanguage'].value}</c:set>
												  <c:if test="${cookie['clientlanguage'].value==null || cookie['clientlanguage'].value==''}">
							                      	<c:set var="clientlanguage"><%=request.getLocale().toString()%></c:set>
							                      </c:if>
													<select name="j_locale" style="width:120px" onChange="changeL(this.value)">
							        					<option value="zh_CN">简体</option>
								                        <option value="zh_HK" <c:if test="${clientlanguage == 'zh_HK'}">selected</c:if>>繁體</option>
							                            <%if(ContextUtils.getInterfaceLicense("lang_en")){ %>
							                            <option value="en_US" <c:if test="${clientlanguage == 'en_US'}">selected</c:if>>English</option>
							                            <%} %>
		                       						</select>
												</td>
											</tr>
											
											<%if("true".equals(Constants.DYNAMIC) || "true".equals(Constants.RTX) || "true".equals(Constants.UCSTAR)) { %>
											<tr>
												<td height="30" align="center" class="logintxt">${login_info_label6}</td>
												<td height="30" align="left">
													<select onChange="changeMode(this);"  name="selectLoginType"  style="width:120px">
				                  						<option value="static"><spring:message text='系统密码' code='loginjsp_label5'/></option>
							                            <%if(ContextUtils.getInterfaceLicense("dynamic")&&"true".equals(Constants.DYNAMIC)) { %>
							                            <option value="dynamic" ><spring:message text='动态密码' code='loginjsp_label6'/></option>
							                            <%}%>
							                            <%if("true".equals(Constants.RTX)) { %>
							                            <option value="rtx"><spring:message text='RTX登录' code='loginjsp_label7'/></option>
							                            <%}%>
							                            <%if( ContextUtils.getInterfaceLicense("im")&&"true".equals(Constants.UCSTAR) ) { %>
							                            <option value="ucstar"><spring:message text="UcSTAR集成" code="loginjsp_label17"/></option>
							                            <%}%>
		                       						</select>
												</td>
											</tr>
											<%} %>
											
											<tr>
												<td height="30" align="center" class="logintxt">${login_username}</td>
												<td height="30" align="left">
													<input name="j_username" type="text" class="login_input" style="width:120px;" onfocus="efocus(event);" onBlur="eblur(event);" onKeyDown="ekeydown(event)" maxlength="50" />
												</td>
											</tr>
											<tr>
												<td height="30" align="center" class="logintxt">${login_password}</td>
												<td height="30" align="left">
													<input name="j_password" type="password" class="login_input" style="width:120px;" onfocus="efocus(event);" onBlur="eblur(event);"  <%if(Constants.IMAGERAND){%> onKeyDown="ekeydown(event)" <%} %>  maxlength="25" />
												</td>
											</tr>
											
											<%if(Constants.IMAGERAND){%>
				                  			<tr>
				                  				<td height="30" align="center" class="logintxt">${login_j_captcha_response}</td>
				                  				<td height="30" align="left">
				                  					<input name="j_captcha_response" type="text" class="login_input" size="18" onfocus="efocus(event);" onBlur="eblur(event);" maxlength="4" />
				                  					<img align='absmiddle' src="<c:url value="/common/image.jpg" />">
				                  				</td>
				                  			</tr>
				                  			<%}%>
											<tr>
												<td height="55" align="center" colspan="2">
													<input type="submit" name="Submit" value="${login_submit}" class="button_login"/>
				                  					<input type="reset" name="Submit2" value="${login_reset}" class="button_reset"/>
												</td>
											</tr>
										</table>
									</form>
								</div>
								
								<%-- ----------------------------动态密码--------------------------- --%>
								<%if("true".equals(Constants.DYNAMIC)) { %>
		                  		<div id="login_dynamic" style="display:none">
		                  			<form name="form_dynamic" method="post" action='<c:url value="/j_acegi_security_check" />' onSubmit="return dyOnSubmit();">
		                  				<input id="j_mode" type="hidden" name="j_mode" value="dynamic">
		                  				<table width="58%" border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td height="270" colspan="2">&nbsp;</td>
											</tr>
											
											<tr>
												<td height="30" align="center" width="28%" class="logintxt">&nbsp;</td>
												<td height="30" align="left">&nbsp;</td>
											</tr>
											
											<%if("true".equals(Constants.DYNAMIC) || "true".equals(Constants.RTX) || "true".equals(Constants.UCSTAR)) { %>
											<tr>
												<td height="30" align="center" class="logintxt">${login_info_label6}</td>
												<td height="30" align="left">
													<select onChange="changeMode(this);"  name="selectLoginType"  style="width:120px">
				                  						<option value="static"><spring:message text='系统密码' code='loginjsp_label5'/></option>
							                            <%if(ContextUtils.getInterfaceLicense("dynamic")&&"true".equals(Constants.DYNAMIC)) { %>
							                            <option value="dynamic" ><spring:message text='动态密码' code='loginjsp_label6'/></option>
							                            <%}%>
							                            <%if("true".equals(Constants.RTX)) { %>
							                            <option value="rtx"><spring:message text='RTX登录' code='loginjsp_label7'/></option>
							                            <%}%>
							                            <%if( ContextUtils.getInterfaceLicense("im")&&"true".equals(Constants.UCSTAR) ) { %>
							                            <option value="ucstar"><spring:message text="UcSTAR集成" code="loginjsp_label17"/></option>
							                            <%}%>
		                       						</select>
												</td>
											</tr>
											<%} %>
											
											<tr>
												<td height="30" align="center" class="logintxt">${login_username}</td>
												<td height="30" align="left">
													<input name="j_username" type="text" class="login_input" style="width:120px;" onfocus="efocus(event);" onBlur="eblur(event);" onKeyDown="ekeydown(event)" maxlength="50" />
												</td>
											</tr>
											<tr>
												<td height="30" align="center" class="logintxt">${login_password}</td>
												<td height="30" align="left">
													<input name="j_password" type="password" class="login_input" style="width:120px;" onfocus="efocus(event);" onBlur="eblur(event);"  <%if(Constants.IMAGERAND){%> onKeyDown="ekeydown(event)" <%} %>  maxlength="25" />
												</td>
											</tr>
														
													
											<tr>
												<td height="55" align="center" colspan="2">
													<input type="submit" name="Submit" value="${login_submit}" class="button_login"/>
				                  					<input type="reset" name="Submit2" value="${login_reset}" class="button_reset"/>
												</td>
											</tr>
										</table>
		                  			</form>
		                  		</div>
		                  		<%} %>
								
								<%-- ----------------------------RTX------------------------------- --%>
								<%if("true".equals(Constants.RTX)) { %>
		                  		<div id="login_rtx" style="display:none">
		                  			<script language="vbscript" id="clientEventHandlersVBS">
									<!--
									Function loginRtx()
										on error resume next
										'<spring:message text='得到帐号' code='loginjsp_label8' />
										Set objKernal = RTXAX.GetObject("KernalRoot")
                                        
										Account = objKernal.Account
                                       
										set objSign = objKernal.Sign

										If Account = "" Then
	   										MsgBox "<spring:message text='您未登录RTX，请先登录到RTX' code='loginjsp_label9' />！"
										Else
											'MsgBox "<spring:message text='当前用户' code='loginjsp_label10' />：" & Account
											'MsgBox "<spring:message text='数字证书' code='loginjsp_label11' />：" & objSign.GetString("Sign")
											'<spring:message text='开始提交表单' code='loginjsp_label12' />

											If isChinese(Account) Then
												Account = UrlEncode(Account)
											End If


											form_rtx.j_username.value = Account
											'<spring:message text='暂时不要用RTX的签名，因为跨平台验证还不能实现' code='loginjsp_label13' />
											'form_rtx.j_password.value = objSign.GetString("Sign")
											form_rtx.submit
										End If
									End Function
									-->
      								</script>
						            <OBJECT id=RTXAX data=data:application/x-oleobject;base64,fajuXg4WLUqEJ7bDM/7aTQADAAAaAAAAGgAAAA==
											classid=clsid:5EEEA87D-160E-4A2D-8427-B6C333FEDA4D VIEWASTEXT>
						            </OBJECT>
						            <form name="form_rtx" id="form_rtx" method="post" action='<c:url value="/j_acegi_security_check" />'>
						                <input id="j_mode" type="hidden" name="j_mode" value="rtx">
						                <input id="j_username" name="j_username" type="hidden" value="">
						                <input id="j_password" name="j_password" type="hidden" value="<%=session.getId()%>">
						                <table width="58%" border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td height="270">&nbsp;</td>
											</tr>
											<tr>
												<td height="100" class="logintxt">
													<spring:message text='如果您的计算机已经成功登录了RTX，OA系统会自动登录到，如果您看到此信息，可能您没有正确登录RTX，请先登录RTX，然后点[登录]按钮。' code='loginjsp_label14' />
												</td>
											</tr>
											<tr>
												<td height="55" align="center">
													<input type="button" name="loginRtxButton" id="loginRtxButton" value="${login_submit}" class="button_login" onClick="loginRtx()" />
				                  					<input type="button" value="<spring:message text='&nbsp;返&nbsp;&nbsp;回&nbsp' code='common_return2' />" class="button_reset" onclick="javascript:window.location.href='${url_home}';return false;" />
												</td>
											</tr>
										</table>
						            </form>
		                  		</div>
		                  		<%} %>
								
								<%-- ----------------------------IM-------------------------------- --%>
								<%if("true".equals(Constants.UCSTAR)) { %>
		                  		<div id="login_ucstar" style="display:none">
		                  			<script language="javascript" >
										function loginByUcstar() {
											var o = isUcstarOnline();
											if ( !o.isOnline ) {
												alert("您未登录UCSTAR，请先登录到UCSTAR");
												return false;
											}
											
											try {
												var name = uc_objectCtrl.GetLoginName();
											//	alert("GetLoginName=" + name);
												if ( typeof(name) == "string" && name != "" ) {
													form_ucstar.j_username.value = name;
													form_ucstar.submit();
												} else {
													alert("您未登录UCSTAR，请先登录到UCSTAR");
													return false;
												}
											} catch ( ex ) {
												alert("发生异常：" + ex.message);
												return false;
											}
											return true;
										}
										
										try {
											uc_registerWinOnload();
										} catch ( ex ) {
										}
      								</script>
      								<form name="form_ucstar" id="form_ucstar" method="post" action='<c:url value="/j_acegi_security_check" />'>
						                <input id="j_mode" type="hidden" name="j_mode" value="ucstar">
						                <input id="j_username" name="j_username" type="hidden" value="">
						                <input id="j_password" name="j_password" type="hidden" value="<%=session.getId()%>">
						                <table width="58%" border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td height="270">&nbsp;</td>
											</tr>
											<tr>
												<td height="120" class="logintxt">
													<spring:message text="如果您的计算机已经成功登录了UcSTAR，OA系统会自动登录到。如果您看到此信息，可能您没有正确登录UcSTAR。请先登录UcSTAR，然后点[登录]按钮。" code="loginjsp_label18" />
												</td>
											</tr>
											<tr>
												<td height="55" align="center">
													<input type="button" name="loginUcstarButton" id="loginUcstarButton" value="${login_submit}" class="button_login" onClick="loginByUcstar()" />
				                                	<input type="button" value="<spring:message text='&nbsp;返&nbsp;&nbsp;回&nbsp' code='common_return2' />" class="button_reset" onclick="javascript:window.location.href='${url_home}';return false;" />
												</td>
											</tr>
										</table>
						           	</form>
		                  		</div>
		                  		<%} %>
								
							</td>
						</tr>
						<tr height="140">
							<td colspan="2" align="center">
								<div style="margin-bottom: 15px;" class="declare" id="msgOffice">&nbsp;</div>
								<c:if test="${languages==null || languages=='simpleChinese'}">
		        					<a href="javascript:void(0);" class="declare" onClick="javascript:window.open('<c:url value="/help/client.jsp"/>');">
              							<spring:message text='客户端环境要求' code='loginjsp_label3' />
              						</a>
              					</c:if>
          						<c:if test="${languages!=null && languages=='complexChinese'}">
          							<a href="javascript:void(0);" class="declare" onClick="javascript:window.open('<c:url value="/help/client_zh_HK.jsp"/>');">
              							<spring:message text='客户端环境要求' code='loginjsp_label3' />
              						</a>
              					</c:if>
          						<c:if test="${languages!=null && languages=='english'}">
          							<a href="javascript:void(0);" class="declare" onClick="javascript:window.open('<c:url value="/help/client_en.jsp"/>');">
              							<spring:message text='客户端环境要求' code='loginjsp_label3' />
              						</a>
              					</c:if>
							</td>
						</tr>
					</table>
				</c:when>
			</c:choose>
		</td>
	</tr>
</table>

</body>
</html>
